using System;
using System.Collections.Generic;
using System.Text;

namespace Dogfight2008
{
  public enum StickPosition
  {
    Lift,
    Neutral,
    Dive
  }

  public class PlaneControl
  {
    public StickPosition StickPosition {
      get
      {
        return stickPosition;
      }
    }
    StickPosition stickPosition = StickPosition.Neutral;
    bool divePushed = false;
    bool liftPushed = false;

    public void DivePushed()
    {
      divePushed = true;
      stickPosition = StickPosition.Dive;
    }

    public void DiveReleased()
    {
      divePushed = false;
      stickPosition = liftPushed ? StickPosition.Lift : StickPosition.Neutral;
    }

    public void LiftPushed()
    {
      liftPushed = true;
      stickPosition = StickPosition.Lift;
    }

    public void LiftReleased()
    {
      liftPushed = false;
      stickPosition = divePushed ? StickPosition.Dive : StickPosition.Neutral;
    }
  }
}
